import HomeView from '@/views/HomeView.vue'
import MainView from '@/views/MainView.vue'
import RecordPage from '@/pages/RecordPage.vue'
import { createRouter, createWebHistory } from 'vue-router'



const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      component: MainView,
      redirect: () => {
        return '/home'
      },
      children: [
        {
          path: '/home',
          name:'home',
          component: HomeView
        },
        {
          path: '/vue_task',
          component: () => import('@/pages/TaskPage.vue')
        },
        {
          path: '/record',
          name: 'record',
          component: RecordPage,
        },
      ]
    },

  ],
})

export default router
